//=============================================================================
#ifndef _CPROJECTILE_H_
 #define _CPROJECTILE_H_

#include <vector>

#include "Entity.h"


//=============================================================================
class CProjectile : public CEntity {
    
	public:
		CProjectile(int X, int Y, int tarX, int tarY, int id);
		//static std::vector <CSpells>spellType;

		enum direction
		{
			DIRECTION_NONE_NONE = 0,
			DIRECTION_LEFT_UP,
			DIRECTION_LEFT_DOWN,
			DIRECTION_RIGHT_UP,
			DIRECTION_RIGHT_DOWN
		};
		
		struct vector{
			double X;
			double Y;
		};
		
		vector vect;

		double xSpeed;
		double ySpeed;

		int deathCount;
		bool collided;

		void projectileToXY();

		bool OnLoad(char* File, int Width, int Height, int MaxFrames);

        void OnLoop();

        void OnRender(SDL_Surface* Surf_Display);

        void OnCleanup();

        void OnAnimate();

        bool OnCollision(CEntity* Entity);

		void CastProjectile(int identifier);

		void RunCollision(CEntity* Entity);
		
};


//=============================================================================

#endif


